package com.datas.db.hibernatebeans;

import com.datas.utils.hibernatebasebean.SimpleHibernateEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * Created by jige0727 on 2017/3/19.
 * 城市
 */
@Getter
@Setter
@Entity
public class UmsRegionCity extends SimpleHibernateEntity {
    String name; //名称
    String code; //编码
    Integer sortorder; //排序号
    String regionCountry_code;
    String regionArea_code;
    String regionProvince_code; //省份id

    String weathercode; //天气预报id

    public UmsRegionCity() {
    }

    public UmsRegionCity(String name, String code, Integer sortorder, String regionCountry_code, String regionProvince_code) {
        this.name = name;
        this.code = code;
        this.sortorder = sortorder;
        this.regionCountry_code = regionCountry_code;
        this.regionProvince_code = regionProvince_code;
    }

    @Column(nullable = false)
    public String getName() {
        return name;
    }

    @Column(nullable = false, unique = true)
    public String getCode() {
        return code;
    }
}
